package com.chenju.invokechainservice.common.enums;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class EasyCode {
    public final static String URL_SPLIT;

    static {
        if (System.getProperty("os.name").toLowerCase().startsWith("win")){
            URL_SPLIT = "\\";
        } else {
            URL_SPLIT = "/";
        }
    }

    public static List<String> springBeanAnnotationList = new ArrayList<>();
    static {
        springBeanAnnotationList.add("org.springframework.stereotype.Component");
        springBeanAnnotationList.add("org.springframework.stereotype.Service");
        springBeanAnnotationList.add("org.springframework.stereotype.Controller");
        springBeanAnnotationList.add("org.springframework.web.bind.annotation.RestController");
        springBeanAnnotationList.add("org.springframework.stereotype.Repository");
        springBeanAnnotationList.add("org.springframework.context.annotation.Configuration");
    }

    public static List<String> adviceAnnotationList = new ArrayList<>();
    static {
        adviceAnnotationList.add("org.aspectj.lang.annotation.Before");
        adviceAnnotationList.add("org.aspectj.lang.annotation.After");
        adviceAnnotationList.add("org.aspectj.lang.annotation.Pointcut");
    }

    @Value("package.startswith")
    public static String packageStartsWith;
}
